<template>
  <div class="test-login-container">
    <div class="title">登录测试页面111 code:</div>
    <div class="code">{{ code }}</div>
    <div>{{ JSON.stringify(info, null, 2) }}</div>
  </div>
</template>

<script setup lang="ts">
import { uniLogin, getUserInfo } from '@/hooks/useLogin';
import { ref, onMounted } from 'vue';

const code = ref('');
const info = ref<any>({})
onMounted(async () => {
  const data = await uniLogin();
  console.log(data, ' code');
  const infoData = await getUserInfo();
  console.log(infoData, 'info')
  info.value = infoData;
  code.value = data;
});
</script>

<style lang="less" scoped>
.test-login-container {
  .code {
    color: red;
    margin-top: 10px;
  }
}
</style>
